# @Filename:    exp1
# @Author:      王佳伟
# @Time:        2025-03-27 21:55
# @Describe:    numpy示例
import numpy as np

# 示例1
a1 = np.array([1, 2, 3])
print(a1)

print('-----------------------')

# 示例2
a2 = np.array([[1, 2], [3, 4]])
print(a2)

print('-----------------------')

# 示例3 最小维度
a3 = np.array([1, 2, 3, 4, 5], ndmin = 2)
print(a3)

print('-----------------------')

# 示例4 dtype参数  数组的所需数据类型，可选。
a4 = np.array([1, 2, 3], dtype = complex)
print(a4)



